#!/bin/sh
# multicast/sink
# 
# Part of the CCNx distribution.
#
# Copyright (C) 2009 Palo Alto Research Center, Inc.
#
# This work is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.
# This work is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.
#
. ./settings
ccnrm /experiments/multicast/DATA
export CCN_EXPERIMENT_ID="$SELF:`./waitgo`"
netstat -s | grep 'dropped due to full socket buffers' > netstat.before
NOW=`date '+%s'`
echo $NOW START $CCN_EXPERIMENT_ID | tee | ccnput -f /experiments/multicast/results/ccnx/$NOW/$SELF/START
ccncatchunks2 -p $PIPELINE /experiments/multicast/DATA/$DATASET | dd of=/dev/null
NOW=`date '+%s'`
echo $NOW STOP $CCN_EXPERIMENT_ID | tee | ccnput -f /experiments/multicast/results/ccnx/$NOW/$SELF/STOP
netstat -s | grep 'dropped due to full socket buffers' | diff  netstat.before -
echo ''wake up, it is ready.
